<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>教师端</title>
    <link rel="stylesheet" href="/css/home_teach.css">
</head>
<body>
<div class="home">
    <header>
        欢迎学号/工号：<%=uid%>，使用学生管理系统，当前您的职务是：<%=posts%>
        <span>【<a href="/logout">退出登录</a>】</span>
    </header>
    <article>
        <ul>
            <li><a href="/add_means">录入学生信息</a></li>
            <li><a href="/sel_means">查看学生资料</a></li>
            <li><a href="/sel_scores">查询学生成绩</a></li>
            <li><a href="/add_scores">添加学生成绩</a></li>
            <li><a href="/home_teach">查看登录日志</a></li>
            <li><a href="/checkpwd">更改密码</a></li>
        </ul>
        <aside>
            <table class="tabs1" cellspacing="0" cellpadding="0">
                <tr >
                    <td class="tds1">序号</td>
                    <td class="tds1">登录者id</td>
                    <td class="tds1">登录者</td>
                    <td class="tds1">登录时间</td>
                </tr>
                <%result.forEach((item,index)=>{%>
                <tr>
                    <td class="tds2"><%=index+1%></td>
                    <td class="tds2"><%=item.login_uid%></td>
                    <td class="tds2"><%=item.stu_name%></td>
                    <td class="tds2"><%=moment(item.logintmp).format('Y-M-D h:m:s')%></td>
                </tr>
                <%})%>
            </table>
            <ol>
                <li>
                    <a href="/home_teach?page=1" style="text-decoration: none;padding: 10px;color: white;background-color: darkgrey;">首页</a>
                </li>
                <%for(var i=1;i<=pages;i++){%>
                    <li>
                        <a style="text-decoration: none;padding: 10px;color: white;background-color: darkgrey;" class="<%if(now_page==i){%>default<%}%>" href="/home_teach?page=<%=i%>">
                            <%=i%>
                        </a>
                    </li>
                <%}%>
                <li>
                    <a style="text-decoration: none;padding: 10px;color: white;background-color: darkgrey;" href="/home_teach?page=<%=pages%>">尾页</a>
                </li>
                <li>一共<%=sum%>条记录</li>
            </ol>
        </aside>
    </article>
</div>
</body>
</html>